﻿namespace Homework08
{/// <summary>
/// 将二进制数转化为十进制
/// </summary>
    internal class Homework08
    {
        static void Main()
        {//输入
            Console.Write("请输入一个二进制数：");
            string binary = Console.ReadLine();
            //指令
            int decimalValue = Convert.ToInt32(binary, 2);
            Console.WriteLine($"{binary}的十进制形式为：{decimalValue}");


        }
    }
}
